'''
浮点数运算的精度损失
'''

import math


def fn(x):
    ans1 = (1.0 - math.cos(x)) / (math.pow(math.sin(x), 2))
    ans2 = 1.0 / (1.0 + math.cos(x))
    return (ans1, ans2)


mlist = range(12)
mlist2 = [math.pow(10, -x) for x in mlist]
ret = [fn(x) for x in mlist2]

for (x, y) in zip(mlist2, ret):
    print(f"{x} => {y}")
